package com.example.demo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Box implements Comparable<Box> {
    public  int i;
    public  int lengthFactor;
    public  int seifFactor;
    public  int numsfactor;
    public  int x;
    public  int y;
    public  Box father;

    public Box(int i, int x, int y) {
        this.i = i;
        this.x = x;
        this.y = y;
    }

    public Box(int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public int compareTo(Box o) {
        return numsfactor-o.numsfactor;
    }

    public boolean equals(Box it){
        if(this.x== it.x&&this.y== it.y){
            return true;
        }else return  false;
    }
}


